﻿@model ScmSafeSupervisionViewModel
@{
    Layout = null;
    ViewBag.Title = "重点建设项目安全监督台账-列表";
    
}
<div class="page" style="border-top: 1px solid #b8d0d6;" layouth="1">
    @using (Html.BeginForm("SplitPage", "ScmSafeSupervision", null, FormMethod.Post, new { id = "pagerForm", onsubmit = "return navTabSearch(this);" }))
    {
        <input type="hidden" name="pageNum" value="1" />
        <input type="hidden" name="numPerPage" value="@(ViewBag.numPerPage)" />
        <ul class="searchBar">
            <li><span>标段：</span>
                <input type="text" name="iput_section" value="@(ViewBag.iput_section)" />
            </li>
            <li><span>存在问题：</span>
                <input type="text" name="iput_question" value="@(ViewBag.iput_question)" />
            </li>
            <li><span>日期：</span>
                <input type="text" name="iput_timestart" value="@(ViewBag.iput_timestart)" class="date"/>
                <span>-</span>
                <input type="text" name="iput_timeend" value="@(ViewBag.iput_timeend)" class="date"/>
            </li>
            <li>
                <button type="submit" class="btn btn-success btn-xs">
                    搜索</button>
            </li>
        </ul>
   
    }
    <div class="panelBar" style="border-top: none;">
        <ul class="toolBar">
            <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafeSupervision.Create", "tzgl_aqsc_add",
                    Url.Action("SafeSupervisionAdd", "ScmSafeSupervision"),
                    "添加",
                    new Dictionary<string, object>
                    {
                        {"class","add"},{"rel","tzgl_aqjd_add"} ,{"mask","true"},{"target","dialog"},{"width","400"},{"height","400"}
                    })
            </li>
            <li>
               @Html.PermissionButton("SafetyConstruction.ScmSafeSupervision.Delete", "tzgl_aqsc_delete",
                             Url.Action("SafesupervisionDelete", "ScmSafeSupervision", new { id = "{ids}" }),
                    "删除",
                    new Dictionary<string, object>
                    {
                        {"class","delete"},{"title","确定要删除这些记录吗?"} ,{"rel","ids"},{"target","ajaxTodo"},{"width","820"},{"height","290"}
                    })
            </li>
            <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafeSupervision.Edit", "tzgl_aqsc_edit",
                    Url.Action("SafesupervisionEdit", "ScmSafeSupervision", new { id = "{ids}" }),
                    "修改",
                    new Dictionary<string, object>
                    {
                        {"class","edit"},{"rel","tzgl_aqjd_edit"} ,{"mask","true"},{"target","dialog"},{"width","400"},{"height","400"},{"warn","请选择一条信息!"}
                    })
            </li>
            <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafeSupervision.Detail", "tzgl_aqsc_detail",
                    Url.Action("SafesupervisionDetail", "ScmSafeSupervision", new { id = "{ids}" }),
                    "查看",
                    new Dictionary<string, object>
                    {
                        {"class","detail"},{"rel","tzgl_aqsc_detail"} ,{"mask","true"},{"target","dialog"},{"width","480"},{"height","400"},{"warn","请选择一条信息!"}
                    })
            </li>
            <li class="line">line</li>
            <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafeSupervision.Download", "tzgl_aqsc_download",
                    "../../Areas/SafetyConstruction/Upload/重点建设项目安全监督台账.xls",
                    "模板",
                    new Dictionary<string, object>
                    {
                        {"class","download"},{"targettype","navTab"} ,{"title","导入模板下载"}
                    })
            </li>
            <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafeSupervision.Input", "tzgl_aqsc_input",
                    Url.Action("Index", "Import", new { url = "/ScmSafeSupervision/ImportExcelFile" }),
                    "导入",
                    new Dictionary<string, object>
                    {
                        {"class","input"},{"rel","tzgl_aqjd_input"} ,{"lookupgroup","attachment"},{"width","320"},{"height","320"},{"title","导入EXCEL"}
                    })
            </li>
            <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafeSupervision.Export", "tzgl_aqsc_export",
                    Url.Action("Excel", "ScmSafeSupervision"),
                    "导出",
                    new Dictionary<string, object>
                    {
                        {"class","export"},{"targettype","navTab"} ,{"title","导出EXCEL"}
                    })
            </li>
        </ul>
    </div>
    <table class="table" width="100%" layouth="122" nowraptd="false">
        <thead>
            <tr>
                <th style="text-align: center;display:none" width="22">
                    <input type="checkbox" group="ids" class="checkboxCtrl">
                </th>
                <th style="text-align: center" width="30">
                    序号
                </th>
                <th style="text-align: center" width="80">
                    存在问题标段
                </th>
                <th style="text-align: center" width="110">
                    通报文号
                </th>
                <th style="text-align: center">
                    存在的主要问题
                </th>
                <th style="text-align: center" width="95">
                    标段整改责任人
                </th>
                <th style="text-align: center" width="80">
                    督办人
                </th>
                <th style="text-align: center">
                    整改及回复情况
                </th>
                <th style="text-align: center" width="80">
                    日期
                </th>
                <th style="text-align: center" width="100">
                    备注
                </th>
            </tr>
        </thead>
        <tbody>
            @{ int num = (ViewBag.pageNum - 1) * ViewBag.numPerPage;}
            @foreach (var item in Model.TheSafesupervisionList)
            {
                num += 1;
                <tr target="ids" rel="@item.Ss_ID">
                    <td style="display:none">
                        <input name="ids" value="@item.Ss_ID" type="checkbox">
                    </td>
                    <td style="text-align: center">@num
                    </td>
                    <td style="text-align: center">
                        <a href="@Url.Action("SafesupervisionDetail", "ScmSafeSupervision", new { id = item.Ss_ID })" rel="tzgl_aqsc_detail" mask="true" target="dialog" width="480" height="400">@item.Ss_Section</a>
                    </td>
                    <td style="text-align: center">@item.Ss_DocumentNumb
                    </td>
                    <td style="text-align: center">@item.Ss_Problem
                    </td>
                    <td style="text-align: center">@item.Ss_CorrectCharge
                    </td>
                    <td style="text-align: center">@item.Ss_Supervise
                    </td>
                    <td style="text-align: center">@item.Ss_CorrectReply
                    </td>
                    <td style="text-align: center">@(item.Ss_Date == null ? "" : Convert.ToDateTime(item.Ss_Date).ToString("yyyy-MM-dd"))
                    </td>
                    <td style="text-align: center">@item.Ss_Remark
                    </td>
                </tr>
            }
        </tbody>
    </table>
    <div class="panelBar" style="border-bottom: none;">
        <div class="pages"  style="float: right">
            <span>显示</span>
            <select class="comsplitpage" id="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="10" @(ViewBag.numPerPage == 10 ? "selected='selected'" : "")>10</option>
                <option value="20" @(ViewBag.numPerPage == 20 ? "selected='selected'" : "")>20</option>
                <option value="50" @(ViewBag.numPerPage == 50 ? "selected='selected'" : "")>50</option>
            </select>
            <span>条，共@(ViewBag.pagenumshown)页,@(ViewBag.totalcount)条</span>
        </div>
        <div class="pagination" style="margin:0px;float:left; margin-left:35%" targettype="navTab" totalcount="@(ViewBag.totalcount)" numperpage="@(ViewBag.numPerPage)" pagenumshown="10" currentpage="@(ViewBag.pageNum)">
        </div>
    </div>
</div>
